package com.fan.play.utils

import android.util.Log

/**
 * 日志打印类
 */
object LogUtil {
    private const val mDebug = true

    private val LOG_TAG = "engine_log"

    fun isDebug(): Boolean {
        return mDebug
    }

    fun logError(logMsg: String) {
        logError(LOG_TAG, logMsg)
    }

    fun logError(tag: String, logMsg: String) {
        if (mDebug)
            Log.e(tag, "${Thread.currentThread().name}: $logMsg")
    }

    fun logInfo(logMsg: String) {
        logInfo(LOG_TAG, logMsg)
    }

    fun logInfo(tag: String, logMsg: String) {
        if (mDebug)
            Log.i(tag, "${Thread.currentThread().name}: $logMsg")
    }
}